﻿<%@ Page MasterPageFile="~/_layouts/application.master" Inherits="Liebrand.UrlShortener.GenerateItem, Liebrand.UrlShortener, Version=1.0.0.0, Culture=neutral, PublicKeyToken=44849c69cb6ba13c" CodeBehind="GenerateItem.aspx.cs" AutoEventWireup="true" %>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register TagPrefix="wssuc" TagName="InputFormSection" src="~/_controltemplates/InputFormSection.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormControl" src="~/_controltemplates/InputFormControl.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="ButtonSection" src="~/_controltemplates/ButtonSection.ascx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
</asp:Content>
<asp:Content ID="Content14" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
    <asp:Literal ID="Literal1" runat="server" Text="<%$Resources:liebrandurlshortenerpages,PageTitle%>" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server">
    <SharePoint:EncodedLiteral ID="EncodedLiteral1" runat="server" text="<%$Resources:liebrandurlshortenerpages,PageTitle %>" EncodeMethod='HtmlEncode'/>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="PlaceHolderMain" runat="server">
    <script language="javascript">
    function CopyToClipboard()
    {
        if (window.clipboardData) 
        {
            var urlForClipboard = document.getElementById("<%=InputFormTextBoxResult.ClientId%>").value;
            window.clipboardData.setData("Text", urlForClipboard);
            var copiedMessage = "<SharePoint:EncodedLiteral runat="server" EncodeMethod="NoEncode" Text="URL copied to clipboard." />";
            alert(copiedMessage);
        }
    }
    </script>


    <table cellspacing="0" cellpadding="0" borderwidth="0" cssclass="ms-propertysheet">
        <asp:Panel ID="PanelStep1" runat="server" Visible="true">
            <wssuc:InputFormSection Title="<%$Resources:liebrandurlshortenerpages, CustomizeURL%>" runat="server">
                <template_description>
                    <SharePoint:EncodedLiteral ID="EncodedLiteral2" runat="server" text="<%$Resources:liebrandurlshortenerpages,GeneratedSectionDescription %>" EncodeMethod='HtmlEncode'/>
                </template_description>
                <template_inputformcontrols>
                    <wssuc:InputFormControl LabelText="URL:" runat="server">
                        <Template_Control>
                            <SharePoint:InputFormTextBox runat="server" ID="TextBoxGeneratedUrl" Visible="true" ReadOnly="false" /><br />
                            <asp:CustomValidator id="CustomerValidator1" runat="server" OnServerValidate="ValidateCustomEntry" ControlToValidate="TextBoxGeneratedUrl" ErrorMessage="The custom name you entered is already in use." />
                        </Template_Control>
                    </wssuc:InputFormControl>
                </template_inputformcontrols>
            </wssuc:InputFormSection>
            <wssuc:ButtonSection runat="server" ShowStandardCancelButton="false">
                <template_buttons>
                    <asp:Button runat="server" CssClass="ms-ButtonHeightWidth" Text="<%$Resources:wss,multipages_okbutton_text%>" OnClick="ButtonOk_Click" ID="ButtonOk"/>&nbsp;
                </template_buttons>
            </wssuc:ButtonSection>
        </asp:Panel>
        <asp:Panel ID="PanelStep2" runat="server" Visible="false">
            <wssuc:InputFormSection Title="<%$Resources:liebrandurlshortenerpages, GeneratedURL%>" runat="server">
                <template_description>
                    <SharePoint:EncodedLiteral ID="EncodedLiteral3" runat="server" text="<%$Resources:liebrandurlshortenerpages,GeneratedSectionDescription2 %>" EncodeMethod='HtmlEncode'/>
                </template_description>
                <template_inputformcontrols>
                    <wssuc:InputFormControl LabelText="URL:" runat="server">
                        <Template_Control>
                            <SharePoint:InputFormTextBox runat="server" ID="InputFormTextBoxResult" Visible="true" ReadOnly="true" Width="250" /><br />
                            <asp:Button id="ButtonCopyUrl" Text="<%$Resources:liebrandurlshortenerpages,CopyToClipboard %>" class="ms-ButtonHeightWidth2" OnClientClick="CopyToClipboard();return false;" runat="server"/>
                        </Template_Control>
                    </wssuc:InputFormControl>
                </template_inputformcontrols>
            </wssuc:InputFormSection>
            <wssuc:ButtonSection runat="server" ShowStandardCancelButton="false">
                <template_buttons>
                    <asp:Button runat="server" CssClass="ms-ButtonHeightWidth" Text="<%$Resources:wss,multipages_okbutton_text%>" OnClick="ButtonClose_Click" ID="ButtonClose"/>&nbsp;
                </template_buttons>
            </wssuc:ButtonSection>
        </asp:Panel>
    </table>
</asp:Content>